home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_bas / vbcolor3.zip / COLORS.FRM < prev    next >
Text File  |  1996-04-17  |  11KB  |  344 lines

  1. VERSION 4.00
  2. Begin VB.Form frmColor 
  3.    AutoRedraw      =   -1  'True
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "VBColor32"
  6.    ClientHeight    =   4035
  7.    ClientLeft      =   1860
  8.    ClientTop       =   1515
  9.    ClientWidth     =   2910
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   0
  13.       weight          =   700
  14.       size            =   8.25
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    ForeColor       =   &H80000008&
  20.    Height          =   4440
  21.    Icon            =   "COLORS.frx":0000
  22.    Left            =   1800
  23.    LinkMode        =   1  'Source
  24.    LinkTopic       =   "Form1"
  25.    MaxButton       =   0   'False
  26.    ScaleHeight     =   4035
  27.    ScaleWidth      =   2910
  28.    Top             =   1170
  29.    Width           =   3030
  30.    Begin VB.CommandButton cmdExit 
  31.       Caption         =   "Exit"
  32.       Height          =   375
  33.       Left            =   1680
  34.       TabIndex        =   17
  35.       Top             =   1560
  36.       Width           =   735
  37.    End
  38.    Begin VB.CommandButton cmdAbout 
  39.       Caption         =   "About"
  40.       Default         =   -1  'True
  41.       Height          =   375
  42.       Left            =   480
  43.       TabIndex        =   16
  44.       Top             =   1560
  45.       Width           =   735
  46.    End
  47.    Begin VB.PictureBox picBlue 
  48.       BackColor       =   &H00FFFFFF&
  49.       Height          =   255
  50.       Left            =   2520
  51.       ScaleHeight     =   195
  52.       ScaleWidth      =   195
  53.       TabIndex        =   5
  54.       Top             =   480
  55.       Width           =   255
  56.    End
  57.    Begin VB.PictureBox picGreen 
  58.       BackColor       =   &H00FFFFFF&
  59.       Height          =   255
  60.       Left            =   1320
  61.       ScaleHeight     =   195
  62.       ScaleWidth      =   195
  63.       TabIndex        =   4
  64.       Top             =   480
  65.       Width           =   255
  66.    End
  67.    Begin VB.PictureBox picRed 
  68.       BackColor       =   &H00FFFFFF&
  69.       Height          =   255
  70.       Left            =   120
  71.       ScaleHeight     =   195
  72.       ScaleWidth      =   195
  73.       TabIndex        =   3
  74.       Top             =   480
  75.       Width           =   255
  76.    End
  77.    Begin VB.TextBox txtDirect 
  78.       BackColor       =   &H00C0C0C0&
  79.       BorderStyle     =   0  'None
  80.       BeginProperty Font 
  81.          name            =   "System"
  82.          charset         =   0
  83.          weight          =   700
  84.          size            =   9.75
  85.          underline       =   0   'False
  86.          italic          =   0   'False
  87.          strikethrough   =   0   'False
  88.       EndProperty
  89.       Height          =   252
  90.       Left            =   840
  91.       TabIndex        =   14
  92.       Top             =   3720
  93.       Width           =   2172
  94.    End
  95.    Begin VB.TextBox txtRgb 
  96.       BackColor       =   &H00C0C0C0&
  97.       BorderStyle     =   0  'None
  98.       BeginProperty Font 
  99.          name            =   "System"
  100.          charset         =   0
  101.          weight          =   700
  102.          size            =   9.75
  103.          underline       =   0   'False
  104.          italic          =   0   'False
  105.          strikethrough   =   0   'False
  106.       EndProperty
  107.       Height          =   255
  108.       Left            =   120
  109.       TabIndex        =   10
  110.       Top             =   3360
  111.       Width           =   2415
  112.    End
  113.    Begin VB.VScrollBar vsbBlue 
  114.       Height          =   1812
  115.       Left            =   2520
  116.       Max             =   255
  117.       TabIndex        =   2
  118.       Top             =   1080
  119.       Width           =   252
  120.    End
  121.    Begin VB.VScrollBar vsbGreen 
  122.       Height          =   1812
  123.       Left            =   1320
  124.       Max             =   255
  125.       TabIndex        =   1
  126.       Top             =   1080
  127.       Width           =   252
  128.    End
  129.    Begin VB.VScrollBar vsbRed 
  130.       Height          =   1812
  131.       Left            =   120
  132.       Max             =   255
  133.       TabIndex        =   0
  134.       Top             =   1080
  135.       Width           =   252
  136.    End
  137.    Begin VB.TextBox txtBlue 
  138.       BackColor       =   &H00C0C0C0&
  139.       BorderStyle     =   0  'None
  140.       BeginProperty Font 
  141.          name            =   "System"
  142.          charset         =   0
  143.          weight          =   700
  144.          size            =   9.75
  145.          underline       =   0   'False
  146.          italic          =   0   'False
  147.          strikethrough   =   0   'False
  148.       EndProperty
  149.       Height          =   252
  150.       Left            =   2520
  151.       TabIndex        =   13
  152.       Top             =   840
  153.       Width           =   372
  154.    End
  155.    Begin VB.TextBox txtGreen 
  156.       BackColor       =   &H00C0C0C0&
  157.       BorderStyle     =   0  'None
  158.       BeginProperty Font 
  159.          name            =   "System"
  160.          charset         =   0
  161.          weight          =   700
  162.          size            =   9.75
  163.          underline       =   0   'False
  164.          italic          =   0   'False
  165.          strikethrough   =   0   'False
  166.       EndProperty
  167.       Height          =   252
  168.       Left            =   1320
  169.       TabIndex        =   12
  170.       Top             =   840
  171.       Width           =   372
  172.    End
  173.    Begin VB.TextBox txtRed 
  174.       BackColor       =   &H00C0C0C0&
  175.       BorderStyle     =   0  'None
  176.       BeginProperty Font 
  177.          name            =   "System"
  178.          charset         =   0
  179.          weight          =   700
  180.          size            =   9.75
  181.          underline       =   0   'False
  182.          italic          =   0   'False
  183.          strikethrough   =   0   'False
  184.       EndProperty
  185.       Height          =   252
  186.       Left            =   120
  187.       TabIndex        =   11
  188.       Top             =   720
  189.       Width           =   372
  190.    End
  191.    Begin VB.PictureBox picAll 
  192.       BackColor       =   &H00FFFFFF&
  193.       Height          =   375
  194.       Left            =   120
  195.       ScaleHeight     =   315
  196.       ScaleWidth      =   2595
  197.       TabIndex        =   6
  198.       Top             =   0
  199.       Width           =   2655
  200.    End
  201.    Begin VB.Label lblBlue 
  202.       AutoSize        =   -1  'True
  203.       BackColor       =   &H00808080&
  204.       BackStyle       =   0  'Transparent
  205.       Caption         =   "Blue"
  206.       BeginProperty Font 
  207.          name            =   "System"
  208.          charset         =   0
  209.          weight          =   700
  210.          size            =   9.75
  211.          underline       =   0   'False
  212.          italic          =   0   'False
  213.          strikethrough   =   0   'False
  214.       EndProperty
  215.       ForeColor       =   &H00C00000&
  216.       Height          =   240
  217.       Left            =   2400
  218.       TabIndex        =   9
  219.       Top             =   3000
  220.       Width           =   450
  221.    End
  222.    Begin VB.Label lblGreen 
  223.       AutoSize        =   -1  'True
  224.       BackColor       =   &H00808080&
  225.       BackStyle       =   0  'Transparent
  226.       Caption         =   "Green"
  227.       BeginProperty Font 
  228.          name            =   "System"
  229.          charset         =   0
  230.          weight          =   700
  231.          size            =   9.75
  232.          underline       =   0   'False
  233.          italic          =   0   'False
  234.          strikethrough   =   0   'False
  235.       EndProperty
  236.       ForeColor       =   &H0000C000&
  237.       Height          =   240
  238.       Left            =   1200
  239.       TabIndex        =   8
  240.       Top             =   3000
  241.       Width           =   585
  242.    End
  243.    Begin VB.Label lblRed 
  244.       AutoSize        =   -1  'True
  245.       BackColor       =   &H00808080&
  246.       BackStyle       =   0  'Transparent
  247.       Caption         =   "Red"
  248.       BeginProperty Font 
  249.          name            =   "System"
  250.          charset         =   0
  251.          weight          =   700
  252.          size            =   9.75
  253.          underline       =   0   'False
  254.          italic          =   0   'False
  255.          strikethrough   =   0   'False
  256.       EndProperty
  257.       ForeColor       =   &H000000C0&
  258.       Height          =   240
  259.       Left            =   120
  260.       TabIndex        =   7
  261.       Top             =   3000
  262.       Width           =   390
  263.    End
  264.    Begin VB.Label lblDirect 
  265.       AutoSize        =   -1  'True
  266.       BackColor       =   &H00808080&
  267.       BackStyle       =   0  'Transparent
  268.       Caption         =   "Direct:"
  269.       BeginProperty Font 
  270.          name            =   "System"
  271.          charset         =   0
  272.          weight          =   700
  273.          size            =   9.75
  274.          underline       =   0   'False
  275.          italic          =   0   'False
  276.          strikethrough   =   0   'False
  277.       EndProperty
  278.       Height          =   240
  279.       Left            =   120
  280.       TabIndex        =   15
  281.       Top             =   3720
  282.       Width           =   630
  283.    End
  284. End
  285. Attribute VB_Name = "frmColor"
  286. Attribute VB_Creatable = False
  287. Attribute VB_Exposed = False
  288.  
  289. Private Sub cmdAbout_Click()
  290. frmAbout.Show
  291. End Sub
  292.  
  293. Private Sub cmdExit_Click()
  294. End
  295. End Sub
  296.  
  297.  
  298. Private Sub Form_Load()
  299.     picRed.BackColor = RGB(255, 0, 0)
  300.     picGreen.BackColor = RGB(0, 255, 0)
  301.     picBlue.BackColor = RGB(0, 0, 255)
  302.     txtRed.Text = "FF"
  303.     txtGreen.Text = "FF"
  304.     txtBlue.Text = "FF"
  305.     txtRgb.Text = "RGB(&HFF, &HFF, &HFF)"
  306.     txtDirect.Text = "&HFFFFFF"
  307. End Sub
  308.  
  309.  
  310. Private Sub vsbBlue_Change()
  311. txtBlue.Text = Hex$(255 - vsbBlue.Value)
  312.       If vsbRed.Value = 255 Then ColorVal1$ = "0" Else ColorVal1$ = txtRed.Text
  313.       If vsbGreen.Value = 255 Then ColorVal2$ = "0" Else ColorVal2$ = txtGreen.Text
  314.       If vsbBlue.Value = 255 Then ColorVal3$ = "0" Else ColorVal3$ = txtBlue.Text
  315.       txtRgb.Text = "RGB(&H" + ColorVal1$ + ", &H" + ColorVal2$ + ", &H" + ColorVal3$ + ")"
  316.       txtDirect.Text = "&H" + ColorVal3$ + ColorVal2$ + ColorVal1$
  317.       picBlue.BackColor = RGB(0, 0, 255 - vsbBlue.Value)
  318.       picAll.BackColor = RGB(255 - vsbRed.Value, 255 - vsbGreen.Value, 255 - vsbBlue.Value)
  319. End Sub
  320.  
  321. Private Sub vsbGreen_Change()
  322. txtGreen.Text = Hex$(255 - vsbGreen.Value)
  323.     If vsbRed.Value = 255 Then ColorVal1$ = "0" Else ColorVal1$ = txtRed.Text
  324.     If vsbGreen.Value = 255 Then ColorVal2$ = "0" Else ColorVal2$ = txtGreen.Text
  325.     If vsbBlue.Value = 255 Then ColorVal3$ = "0" Else ColorVal3$ = txtBlue.Text
  326.     txtRgb.Text = "RGB(&H" + ColorVal1$ + ", &H" + ColorVal2$ + ", &H" + ColorVal3$ + ")"
  327.     txtDirect.Text = "&H" + ColorVal3$ + ColorVal2$ + ColorVal1$
  328.     picGreen.BackColor = RGB(0, 255 - vsbGreen.Value, 0)
  329.      picAll.BackColor = RGB(255 - vsbRed.Value, 255 - vsbGreen.Value, 255 - vsbBlue.Value)
  330. End Sub
  331.  
  332. Private Sub vsbRed_Change()
  333. txtRed.Text = Hex$(255 - vsbRed.Value)
  334.     If vsbRed.Value = 255 Then ColorVal1$ = "0" Else ColorVal1$ = txtRed.Text
  335.     If vsbGreen.Value = 255 Then ColorVal2$ = "0" Else ColorVal2$ = txtGreen.Text
  336.     If vsbBlue.Value = 255 Then ColorVal3$ = "0" Else ColorVal3$ = txtBlue.Text
  337.     txtRgb.Text = "RGB(&H" + ColorVal1$ + ", &H" + ColorVal2$ + ", &H" + ColorVal3$ + ")"
  338.     txtDirect.Text = "&H" + ColorVal3$ + ColorVal2$ + ColorVal1$
  339.     picRed.BackColor = RGB(255 - vsbRed.Value, 0, 0)
  340.     picAll.BackColor = RGB(255 - vsbRed.Value, 255 - vsbGreen.Value, 255 - vsbBlue.Value)
  341. End Sub
  342.  
  343.  
  344.